<?php
class OverviewController extends Zend_Controller_Action
{
	private $_uiVar = array();
	private $_member;
	
	public function init()
	{
		$this->_uiVar["html"]["title"] = STE_Html::WEBSITE_TITLE;
		
		try
		{
			$db = Zend_Registry::get("DB");
			
			$this->_news = new STE_News($db);
		}
		catch (Exception $ex)
		{
			echo $ex->getMessage();
		}
	}
	
	function indexAction()
	{
		$adminSession = new Zend_Session_Namespace("STE_ADMIN");
		if ((isset($adminSession->member["IS_LOGIN"])) && ($adminSession->member["IS_LOGIN"] == 1))
		{
			$smarty = Zend_Registry::get("SMARTY");
			$smarty->assign("uiVar", $this->_uiVar);
			$smarty->display("overview/index.tpl");
		}
		else
		{
			$zokikAdminSession->redirect["NEXT_URL"] = "/overview";
			header("Location: /member/login");
		}
	}
}
?>